local ChoiceName = Var("GameCommand"):GetText()

local ArrowFrames = {{};{};}

for i=0,5 do
	ArrowFrames[1][#ArrowFrames[1]+1] = {Frame = i; Delay = 0.1}
end
for i=6,11 do
	ArrowFrames[2][#ArrowFrames[2]+1] = {Frame = i; Delay = 0.1}
end

return Def.ActorFrame {
	LoadActor("BA01")..{
		Frames = (ChoiceName == "credits" or ChoiceName == "exit") and ArrowFrames[2] or ArrowFrames[1];
		InitCommand=function(self)
			if ChoiceName == "option" or ChoiceName == "exit" then
				self:rotationy(180);
			end
			if ChoiceName == "credits" or ChoiceName == "exit" then
				self:rotationx(180);
			end
		end;
		GainFocusCommand=cmd(visible,true;pulse;effectperiod,0.5;effectmagnitude,1.1,1,1);
		LoseFocusCommand=cmd(visible,false);
	};
	LoadActor(ChoiceName)..{
		InitCommand=function(self)
			local x,y
			if ChoiceName == "option" then
				x = 6
				y = -5
			elseif ChoiceName == "credits" then
				x = -4
				y = 5
			elseif ChoiceName == "exit" then
				x = 5
				y = 5
			else
				x = -3
				y = -3
			end
			self:x(x);
			self:y(y);
		end;
		GainFocusCommand=cmd(diffuse,0,0,0,1;pulse;effectperiod,0.5;effectmagnitude,1.1,1,1);
		LoseFocusCommand=cmd(diffuse,1,1,1,1;stopeffect);
	}
}